package helper;

import finds.Finder;
import pages.AddDevicePage;
import pages.HomePage;
import pages.SettingPage;

/**
 * Created by 13714526025 on 2018/9/19.
 * Description：管理所有界面的类
 */
public class Helper {
    private Finder finder;
    HomePage homePage;
    AddDevicePage addDevicePage;
    SettingPage settingPage;
    public Helper(Finder finder){
        this.finder=finder;
    }
    public HomePage getHomePage() {
        if (homePage == null) {
            homePage = new HomePage(finder);
        }
        return homePage;
    }
    public AddDevicePage getAddDevicePage(){
        if(addDevicePage==null){
            addDevicePage=new AddDevicePage(finder);
        }
        return addDevicePage;
    }
    public SettingPage getSettingPage(){
        if(settingPage==null){
            settingPage=new SettingPage(finder);
        }
        return settingPage;
    }
}
